package com.xsmart.oa.api.mall.mymenu;

import com.xsmart.common.entity.RequestBean;
import com.xsmart.oa.services.mall.mymenu.UserApplyService;
import com.xsmart.oa.services.mall.mymenu.UserDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/api")
public class UserDetailsController {

    @Autowired
    UserDetailsService userDetailsService;

    @RequestMapping(value = "/v1/UserDetailsService/findByUserName", method = RequestMethod.POST)
    @ResponseBody
    public Object findByUserName(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return userDetailsService.findByUserName(requestBean);
    }
}
